<?php

/**
 *  @author  Lynn Cho <lynncho@live.com>
 *  @createTime  2016-9-18 10:54:09
 *  @copyright  shewen technology
 *  @descrition  
 */
class BaseModel extends CI_Model {

    public function __construct() {
        parent::__construct();
    }

    /**
     * create id
     * @param array $index
     * @return array
     */
    public function createID($table, $idField) {
        if (!empty($table) || !empty($table)) {
            $max = $this->db->select_max($idField)->get($table)->row()->$idField;
            return ($max + 1);
        }
    }

}
